<html>
<head>
<style>
  .ace_editor {
    border: 0;
    width: auto;
    height: 100%;
    margin: 0;
    top:0;
    right:0;
    bottom:0;
    left:0;
    z-index: 10000;
    touch-action: none;
  }

  body {
    padding: 0px;
    margin: 0px;
    overflow: hidden;
    -ms-overflow-style: scrollbar;
  }
</style>
</head>
<body>
<textarea id="source">package com.sencha.gxt.examples.resources.client.model;

public class Movies {

  private int year;
  private double action;
  private double comedy;
  private double drama;
  private double thriller;
  
  public Movies(int year, double action, double comedy, double drama, double thriller) {
    this.year = year;
    this.action = action;
    this.comedy = comedy;
    this.drama = drama;
    this.thriller = thriller;
  }

  public double getAction() {
    return action;
  }

  public double getComedy() {
    return comedy;
  }

  public double getDrama() {
    return drama;
  }

  public double getThriller() {
    return thriller;
  }

  public int getYear() {
    return year;
  }

  public void setAction(double action) {
    this.action = action;
  }

  public void setComedy(double comedy) {
    this.comedy = comedy;
  }

  public void setDrama(double drama) {
    this.drama = drama;
  }

  public void setThriller(double thriller) {
    this.thriller = thriller;
  }

  public void setYear(int year) {
    this.year = year;
  }
  
}
</textarea>

<script src="../../samples/ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
  var type = "{type}";
  if (type == ("{" + "type}")) {
    // something went wrong, use java as default
    type = "java";
  }
  var editor = ace.edit("source");
  var mode = "ace/mode/" + type;
  var theme = "ace/theme/chrome";
  var readOnly = true;
  editor.getSession().setMode(mode);
  editor.getSession().setUseWorker(false);
  editor.setTheme(theme);
  editor.setShowPrintMargin(false);
  editor.renderer.setShowGutter(true);
  editor.setHighlightActiveLine(false);
  editor.setDisplayIndentGuides(true);
  editor.setReadOnly(readOnly);
  editor.renderer.setPadding(10);
  editor.renderer.setScrollMargin(10, 10, 0, 0);
  editor.getSession().setOptions({
    tabSize: 8,
    useSoftTabs: true,
    useWrapMode: false,
  });
</script>
</body>
</html>